#!/bin/bash

# 自动测试
# ./build_run_test_fingerprintd.sh -d
dir=$(cd $(dirname $0) && pwd)

cd $dir/app/src/main/java
# # clean
find . -name "*.class"  | xargs rm -f
# build
javac MessageMain.java
# run
java MessageMain
if [ $? -ne 0 ]; then
  REVAL=-1
else
  REVAL=0
fi

cd - >/dev/null 2>&1

function my_return() {
    return $1
}
echo 测试结果:$REVAL
my_return $REVAL
